<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./origindata.js"></script>
    <script>
        // console.log(data);

        // json数据转js数据 

        var res = JSON.parse(data);

        // console.log(res['items']['item']);
        var newdata = res['items']['item']; // 数组 
        var newarr = [];
        for(var v of newdata){
            var obj = {};
            // console.log(v['pic_url']);
            // console.log(v['title']);
            // console.log(v['price']);
            // console.log(v['sales']);
            // console.log(v['seller_nick']);
            // console.log(v['detail_url']);
            // console.log(v['data_update']);
            obj['pic_url'] =v['pic_url'];
            obj['title'] = v['title'];
            obj['price'] =v['price'];
            obj['sales'] =v['sales'];
            obj['seller_nick'] =v['seller_nick'];
            obj['detail_url'] =v['detail_url'];
            obj['data_update'] =v['data_update'];

            // console.log(obj);
            newarr.push(obj)

        }

        console.log(newarr);
    </script>
</body>
</html>